home *** CD-ROM | disk | FTP | other *** search
- /*
-
- This is the header file for the routines in the
- MacWorkStation Library.
-
- */
-
- #ifdef XXX_YYY
- #include <QuickDraw.h>
- #include <DialogMGR.h>
- #include <EventMGR.h>
- #include <FontMGR.h>
- #include <MenuMGR.h>
- #include <TextEdit.h>
- #include <WindowMGR.h>
- #include <EventMGR.h>
- #include <PackageMgr.h>
- #endif
-
- #include "MWS_TLPM.h"
-
- #ifdef RUBBISH
- pascal void MacsBug() extern 0xA9FF;
- #endif
-
- /*
- * names get converted to uppercase when converting .o to lightspeed
- * c project
- */
- #define TL_Init TL_INIT
- #define TL_Open TL_OPEN
- #define TL_Close TL_CLOSE
- #define TL_Send TL_SEND
- #define TL_Receive TL_RECEIVE
-
- extern pascal OSErr TL_Init();
- extern pascal OSErr TL_Open(short protocol, TPTLParms params);
- extern pascal OSErr TL_Close();
- extern pascal OSErr TL_Send(long dataLen, Ptr dataPtr, Boolean msgValid);
- extern pascal OSErr TL_Receive(long dataMax, long *dataLen, Ptr dataPtr, Boolean *msgValid);
-
- /* Message Classes */
-
- #define kCmdAlert 'A'
- #define kCmdCursor 'C'
- #define kCmdDialog 'D'
- #define kCmdFile 'F'
- #define kCmdGraphic 'G'
- #define kCmdList 'L'
- #define kCmdMenu 'M'
- #define kCmdProcess 'P'
- #define kCmdText 'T'
- #define kCmdWindow 'W'
- #define kCmdExec 'X'
-
- /* Parameter seperators */
-
- #define kMsgNoMark '\0'
- #define kMsgItemMark ','
- #define kMsgParmMark ';'
-
- /* Indexes into message array */
-
- #define kMsgClass 0
- #define kMsgID 1
- #define kMsgParms 4
- #define kMsgMaxData 550
-
- /* Message data structure used by parsing routines */
-
- typedef struct {
- long msgIndex; /* Index into message */
- long msgLength; /* Length of message */
- Boolean msgValid; /* TRUE if valid message */
- Boolean filler; /* to match Pascal declaration */
- char msgData[kMsgMaxData];
- } TRMsg, *TPMsg;
-
- pascal Boolean Msg_Send(TPMsg msg);
- pascal Boolean Msg_CSend(Ptr msg);
- pascal Boolean Msg_PSend(StringPtr msg);
- pascal Boolean Msg_Receive(TPMsg msg);
-
- pascal void Msg_SetEvt(TPMsg msg, OSType classID);
- pascal void Msg_SetConst(TPMsg msg, Str255 str, short mark);
- pascal void Msg_SetCString(TPMsg msg, char *str, short mark);
- pascal void Msg_SetString(TPMsg msg, Str255 str, short mark);
- pascal void Msg_SetNumber(TPMsg msg, long num, short mark);
- pascal void Msg_SetFlag(TPMsg msg, Boolean flag, short mark);
- pascal void Msg_SetRect(TPMsg msg, Rect *frame, short mark);
- pascal void Msg_SetBytes(TPMsg msg, Ptr bytes, long len, short mark);
-
- pascal Boolean Msg_GetCmd(TPMsg msg, short *class, long *id);
- pascal Boolean Msg_GetString(TPMsg msg, Str255 str, short mark);
- pascal Boolean Msg_GetNumber(TPMsg msg, long *num, short mark);
- pascal Boolean Msg_GetFlag(TPMsg msg, Boolean *flag, short mark);
- pascal Boolean Msg_GetPoint(TPMsg msg, Point *pt, short mark);
- pascal Boolean Msg_GetRect(TPMsg msg, Rect *frame, short mark);
- pascal Boolean Msg_GetSignature(TPMsg msg, OSType *sig, short mark);
-
- /* End of MWS.h */